#!/usr/bin/env python
# _*_ coding: utf-8 _*_
# @Time : 2025/5/15 10:28
# @Author : fanzf
# @Version：V 0.1
# @File : CqGwyJobItem.py
# @desc :
import datetime


class CqGwyJobItem():
    # 动态字段添加
    def __setattr__(self, key, value):
        if not value:
            value = '无'
        if key == 'setup_date' or key == 'finished_date':
            if type(value) == datetime.datetime:
                self.__dict__[key] = value.strftime("%Y%m%d")
            else:
                self.__dict__[key] = value
        else:
            self.__dict__[key] = value

    def __getattr__(self, item):
        return self.__dict__[item]